package com.rtx.edi.platform.rule.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rtx.edi.platform.rule.bean.WhseidRule;
import com.rtx.edi.platform.rule.mapper.WhseidRuleMapper;
import com.rtx.edi.platform.rule.service.WhseidRuleService;

@Service
public class WhseidRuleServiceImpl extends ServiceImpl<WhseidRuleMapper, WhseidRule> implements WhseidRuleService{

	@Override
	public void selectList(Page<WhseidRule> pageParam, WhseidRule dto) {
		LambdaQueryWrapper<WhseidRule> qw = Wrappers.lambdaQuery();
		qw.like(dto.getName() != null,WhseidRule::getName, dto.getName());
		qw.like(dto.getMaindatasource() != null,WhseidRule::getMaindatasource, dto.getMaindatasource());
		qw.like(dto.getSubdatasourcelist() != null,WhseidRule::getSubdatasourcelist, dto.getSubdatasourcelist());
		qw.like(dto.getBeanname() != null,WhseidRule::getBeanname, dto.getBeanname());
		baseMapper.selectPage(pageParam, qw);
	}
}
